package com.bite.demo.controller;

import com.bite.demo.model.UserInfo;
import com.bite.demo.service.UserService;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;

@Controller
public class UserController {
    @Autowired
    private UserService userService;
/*


    public UserController() {

    }
    @Autowired
    public void UserController(UserService userService) {
        this.userService =  userService;
    }
*/
    //@Qualifier("u1")
    @Autowired
    //@Resource(name = "u1")
    private UserInfo userName;

    public void sayHi() {
        System.out.println("hi,usercontroller");
        userService.sayHi();
        System.out.println(userName);

    }
}
